<#assign baseURL = springMacroRequestContext.getContextPath() />
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>拓深科技</title>
<#include "./css.ftl">
</head>
<body>
<div id="wrapper">

<#include "./left_nav.ftl">

    <div id="page-wrapper" class="gray-bg dashbard-1 animated fadeInRight">
    <#include "./top_nav.ftl">
        <div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-9">
                <h2>系统日志</h2>
                <ol class="breadcrumb">
                    <li>
                        消防可视化管理系统
                    </li>
                    <li class="active">
                        系统日志
                    </li>
                </ol>
            </div>
        </div>
        <div class="wrapper wrapper-content">
        <div class="row">
        <#if (role_type_id > 3 )>

            <div class="widget red-bg p-lg text-center">
                <div class="m-b-lg">
                    <i class="fa fa-bell fa-4x" style="margin-bottom: 20px"></i>
                    <h1 class="font-bold no-margins">
                        权限不足
                    </h1>
                </div>
            </div>

        <#else >

            <table class="table table-striped table-bordered table-hover " id="systemLogTable" cellspacing="0" width="100%">
                <thead>
                <tr>
                    <th>时间</th>
                    <th>类型</th>
                    <th>内容</th>
                    <th>用户</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>

        </#if>
        </div>
        </div>
    <#include "./bottom_nav.ftl">
    </div>

</div>


<#include "./js.ftl">

<#if (role_type_id > 3 )>
<#else >

<script>
    $(function(){
        socketInit("//" + getURL() + "${baseURL}")
    });

    var systemLogTable = $('#systemLogTable').DataTable({
        language: {
            "sProcessing": "处理中...",
            "sLengthMenu": "显示 _MENU_ 项结果",
            "sZeroRecords": "没有匹配结果",
            "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
            "sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",
            "sInfoFiltered": "(由 _MAX_ 项结果过滤)",
            "sInfoPostFix": "",
            "sSearch": "搜索:",
            "sUrl": "",
            "sEmptyTable": "表中数据为空",
            "sLoadingRecords": "载入中...",
            "sInfoThousands": ",",
            "oPaginate": {
                "sFirst": "首页",
                "sPrevious": "上页",
                "sNext": "下页",
                "sLast": "末页"
            },
            "oAria": {
                "sSortAscending": ": 以升序排列此列",
                "sSortDescending": ": 以降序排列此列"
            }
        },
        ajax: "${baseURL}/xkLog/getSimpleData",
        columns:[
            {"data":"log_time","width":"15%"},
            {"data":"log_type"},
            {"data":"log_detail"},
            {"data":"user_name","width":"10%"}
        ],
        destroy: true,
        serverSide: true,
        searching:false
    });
</script>

</#if>
</body>
</html>